﻿<Page x:Class="MyCalManager.View.NewDay"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:Helper="clr-namespace:MyCalManager.Helper"
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="300"
	  Title="NewDay"
      DataContext="{Binding NewDay, Source={StaticResource Locator}}">
    <Page.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Skins/MainSkin.xaml" />
                <ResourceDictionary Source="/Skins/Theme.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Page.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        

        <StackPanel HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="0" Margin="10">
            <Calendar Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center" SelectedDate="{Binding selectedDate}" SelectionMode="SingleDate"/>
            <StackPanel Margin="5" HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Horizontal">
                <Helper:InfoTextBox Text="{Binding Gewicht, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" InputType="DecimalNotNull" IsValid="{Binding weightValid,Mode=TwoWay}" TextBoxInfo="{Loc infoTextBox1}"  Width="130" HorizontalAlignment="Left" VerticalAlignment="Center" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" />
                <Label VerticalContentAlignment="Bottom" Content="Kg"></Label>
                <Button ToolTipService.ShowOnDisabled="True" Margin="2,0,0,0" Width="25" Height="25" ToolTip="{Loc SmallUpdateUserDBBtn}" Command="{Binding UpdateDay}">
                    <Button.Content>
                        <Image Style="{StaticResource toolbarImageStyle}" Source="pack://application:,,,/Images/file_edit.png"></Image>
                    </Button.Content>
                </Button>
                <Button Command="{Binding Cancel}" Margin="10,0,0,0" ToolTip="{Loc SmallCancelBtn}" Width="25" Height="25">
                    <Button.Content>
                        <Image Source="pack://application:,,,/Images/Remove Mark.png"></Image>
                    </Button.Content>
                </Button>
                <Button Command="{Binding Ok}" Margin="10,0,0,0" ToolTip="Ok" Width="25" Height="25">
                    <Button.Content>
                        <Image Style="{StaticResource toolbarImageStyle}" Source="pack://application:,,,/Images/Check Mark.png"></Image>
                    </Button.Content>
                </Button>
            </StackPanel>
            <Label Foreground="Red" Margin="5,0,0,0" Content="{Binding Orig}" HorizontalAlignment="Left" VerticalAlignment="Center"></Label>
        </StackPanel>
    </Grid>
</Page>
